#ifndef LABDIALOG_H
#define LABDIALOG_H

#include <QtGui/QDialog>
#include <QGraphicsItem>
#include <QGraphicsScene>
#include <iostream>
#include <QMenu>
#include <QContextMenuEvent>
#include <QObject>
#include <QToolTip>
#include <cstdlib>
#include "nodegraphics.h"
#include "staralgorithm.h"

namespace Ui {
    class labDialog;
}

class labDialog : public QDialog {
    Q_OBJECT
public:
    labDialog(QWidget *parent = 0);
    ~labDialog();
    QGraphicsScene *scene;
    void update();
    QAction *resetAc;
    QAction *solveAc;
    void newScene();

protected:
    void changeEvent(QEvent *e);

private:
    Ui::labDialog *m_ui;
    QAction *initAc;
    QAction *endAc;
    QAction *wayAc;
    QAction *shHiListsAc;
    int lastRow,lastCol;
    QPoint lastPos;

protected:
    bool event(QEvent *event);

public slots:
    void showMenu(int row, int col, QPoint pos);
    void slotWay();
    void slotInit();
    void slotEnd();
    void showHideLists();
    void showInfo();

signals:
    int actSignal(int row, int col,ACTION a);
};

#endif // LABDIALOG_H
